package com.heima.controller.v1;

import com.heima.service.ArticleConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/articleConfig")
public class ArticleConfigController {

    @Autowired
    private ArticleConfigService articleConfigService;

    /**
     * 当自媒体文章审核通过时，添加Article表同时，添加ArticleConfig表
     * @param articleId
     */
    @PostMapping("/save")
    public void saveArticleConfig(@RequestBody Long articleId){
        articleConfigService.saveArticleConfig(articleId);
    }

}
